import request from '../utils/request'
import { post,get } from '@/apis/base'

export function getHouselist(params) {
  return request({
    url: 'v1/accessor/search',
    method: 'get',
    params: params
  })
}
export function getHousedetail(params) {
  return request({
    url: 'v1/house/get-detail',
    method: 'get',
    params: params
  })
}
export function getEdithousedetail(params) {
  return request({
    url: 'v1/house/get-house-edit-detail',
    method: 'get',
    params: params
  })
}
export function getEditroomdetail(params) {
  return request({
    url: 'v1/house/get-room-edit-detail',
    method: 'get',
    params: params
  })
}
export function getUnloginHousedetail(params) {
  return request({
    url: 'v1/accessor/get-detail',
    method: 'get',
    params: params
  })
}
export function houseRelease(params) {
  return request({
    url: 'v1/house/landlord-release',
    method: 'post',
    data: params
  })
}
export function getToken(params) {
  return request({
    url: 'v1/accessor/get-image-token',
    method: 'get',
    params: params
  })
}
export function getVideoToken(params) {
  return request({
    url: 'v1/accessor/get-video-token',
    method: 'get',
    params: params
  })
}
export function collectHouse(data) {
  return request({
    headers: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    url: 'v1/user/room-collected',
    method: 'post',
    data
  })
}
export function cancelcollectHouse(data) {
  return request({
    headers: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    url: 'v1/user/room-uncollected',
    method: 'post',
    data
  })
}
export function collectBuyHouse(data) {
  return request({
    headers: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    url: 'v1/user/house-collected',
    method: 'post',
    data
  })
}
export function cancelcollectBuyHouse(data) {
  return request({
    headers: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    url: 'v1/user/house-uncollected',
    method: 'post',
    data
  })
}
export function getcollectHouse(params) {
  return request({
    url: 'v1/user/get-room-collected',
    method: 'get',
    params
  })
}
export function getBuycollectHouse(params) {
  return request({
    url: 'v1/user/get-house-collected',
    method: 'get',
    params
  })
}
export function getNewcollectHouse(params) {
  return request({
    url: 'v1/user/get-new-house-collected',
    method: 'get',
    params
  })
}
export function vaguesearch(params) {
  return request({
    url: 'v1/accessor/vague-search',
    method: 'get',
    params
  })
}
export function buyvaguesearch(params) {
  return request({
    url: 'v1/accessor/second-hand-vague-search',
    method: 'get',
    params
  })
}
export function newvaguesearch(params) {
  return request({
    url: 'v1/accessor/house-new-vague-search',
    method: 'get',
    params
  })
}
export function getqualifications(params) {
  return request({
    url: 'v1/accessor/get-qualify',
    method: 'get',
    params
  })
}
export function buyhouseUphouse(data) {
  return request({
    url: 'v1/agent/second-hand-release',
    method: 'post',
    data
  })
}
export function ranterserch(params) {
  return request({
    url: 'v1/user/tenant-search',
    method: 'get',
    params
  })
}
export function getRentownerhouse(params) {
  return request({
    url: 'v1/house/get-landlord-house',
    method: 'get',
    params
  })
}
export function getRentownerroom(params) {
  return request({
    url: 'v1/house/get-landlord-room',
    method: 'get',
    params
  })
}
export function houseupdown(data) {
  return request({
    url: 'v1/house/landlord-house-put',
    method: 'post',
    data
  })
}
export function roomupdown(data) {
  return request({
    url: 'v1/house/landlord-room-put',
    method: 'post',
    data
  })
}
export function roomchange(data) {
  return request({
    url: 'v1/house/update-landlord-room',
    method: 'post',
    data
  })
}
export function housechange(data) {
  return request({
    url: 'v1/house/update-landlord-house',
    method: 'post',
    data
  })
}
export function getBuyhouselist(params) {
  return request({
    url: 'v1/accessor/second-hand-search',
    method: 'get',
    params
  })
}
export function getBuyhousedetail(params) {
  return request({
    url: 'v1/house/second-house-detail',
    method: 'get',
    params
  })
}
export function getUnloginBuyHousedetail(params) {
  return request({
    url: 'v1/accessor/second-house-detail',
    method: 'get',
    params: params
  })
}
export function getAgenthouse(params) {
  return request({
    url: 'v1/agent/get-house',
    method: 'get',
    params
  })
}
export function buyhouseupdown(data) {
  return request({
    url: 'v1/agent/second-hand-put',
    method: 'post',
    data
  })
}
export function buyhousechange(data) {
  return request({
    url: 'v1/agent/second-hand-update',
    method: 'post',
    data
  })
}
export function buyhouseEntrust(data) {
  return request({
    url: 'v1/owner/agent-trust',
    method: 'post',
    data
  })
}
export function getBuyhouseService(params) {
  return request({
    url: 'v1/house/get-house-by-sn',
    method: 'get',
    params
  })
}
export function ownerUphouse(data) {
  return request({
    url: 'v1/owner/release',
    method: 'post',
    data
  })
}
export function newHousesearch(params) {
  return request({
    url: 'v1/accessor/house-new-search',
    method: 'get',
    params
  })
}
export function newHousedetail(params) {
  return request({
    url: 'v1/accessor/house-new-detail',
    method: 'get',
    params
  })
}
export function landlordHousePut(params) {
  return post('v1/house/landlord-house-put', params)
}
export function getSecondHouseEdit(params) {
  return get('v1/house/get-second-house-edit', params)
}
export function modifySecondHouse(params) {
  return post('v1/owner/edit-hand-second-house', params)
}
